import request from "@/utils/request";

// 获取题库目录列表
export function getList(data) {
  return request({
    url: "/api/exam/bankCategory/getList",
    method: "post",
    data,
  });
}
// 获取题库目录
export function getInfo(id) {
  return request({
    url: `/api/exam/bankCategory/${id}`,
    method: "get",
  });
}
// 获取题库目录详情
export function getDetail(id) {
  return request({
    url: `/api/exam/bankCategory/detail/${id}`,
    method: "get",
  });
}
// 删除题库目录
export function Delete(id) {
  return request({
    url: `/api/exam/bankCategory/${id}`,
    method: "DELETE",
  });
}
// 修改题库目录
export function Update(data) {
  return request({
    url: `/api/exam/bankCategory/${data.id}`,
    method: "PUT",
    data,
  });
}
// 新建题库目录
export function Create(data) {
  return request({
    url: "/api/exam/bankCategory",
    method: "post",
    data,
  });
}

// 题库目录树查询
export function getCategorySelector(data) {
  return request({
    url: "/api/exam/bankCategory/getListTree",
    method: "GET",
    data,
  });
}

// 题库目录树查询
export function getSelector(data) {
  return request({
    url: "/api/exam/bankCategory/Selector",
    method: "GET",
    data,
  });
}
